<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
<head th:replace="dashboard/header :: header"></head>
<body class="gray-bg">

<!--
@desc  管理
@author WeiXiaoJin
@since 2020-01-30 07:28:26
-->

	<div class="container-div">
		<div class="row">
			<div class="col-sm-12 search-collapse">
				<form id="operlog-form">
					<div class="select-list">
						<ul>
		<li><label> api链接 </label><input type="text" name="condition[url|like]"/></li>
						<li><label>  请求方式 </label><input type="text" name="condition[method|like]"/></li>
						<li><label> 参数列表 </label><input type="text" name="condition[param|like]"/></li>
						<li><label> 请求参数备注 </label><input type="text" name="condition[paramRemark|like]"/></li>
						<li><label> 请求示例 </label><input type="text" name="condition[requestExam|like]"/></li>
						<li><label> 返回参数说明 </label><input type="text" name="condition[responseParam|like]"/></li>
						<li><label> 接口错误码列表 </label><input type="text" name="condition[errorList|like]"/></li>
						<li><label> 正确返回示例 </label><input type="text" name="condition[trueExam|like]"/></li>
						<li><label> 错误返回示例 </label><input type="text" name="condition[falseExam|like]"/></li>
						<li><label> 是否可用;0不可用；1可用;-1 删除 </label><input type="text" name="condition[status|like]"/></li>
						<li><label> 所属模块ID </label><input type="text" name="condition[moduleId|like]"/></li>
						<li><label> 接口名 </label><input type="text" name="condition[interfaceName|like]"/></li>
						<li><label> remark </label><input type="text" name="condition[remark|like]"/></li>
						<li><label> 错误码、错误码信息 </label><input type="text" name="condition[errors|like]"/></li>
						<li><label> updateBy </label><input type="text" name="condition[updateBy|like]"/></li>
						<li class="select-time">
							<label> createTime </label>
							<input type="text" class="time-input" placeholder="开始时间" name="condition[createTime|geTime]" lay-key="createTime-1">
							<span>-</span>
							<input type="text" class="time-input" placeholder="结束时间" name="condition[createTime|gtTime]" lay-key="createTime-2">
						</li>
						<li><label> 版本号 </label><input type="text" name="condition[version|like]"/></li>
						<li><label> 排序，越大越靠前 </label><input type="text" name="condition[sequence|like]"/></li>
						<li><label> header </label><input type="text" name="condition[header|like]"/></li>
						<li><label> fullUrl </label><input type="text" name="condition[fullUrl|like]"/></li>
						<li><label> 监控类型，多选：
Network("网络异常",1),Include("包含指定字符串",2),NotInclude("不包含指定字符串",3),NotEqual("不等于指定字符串",4);	
 </label><input type="text" name="condition[monitorType|like]"/></li>
						<li><label> 监控比较内容 </label><input type="text" name="condition[monitorText|like]"/></li>
						<li><label> monitorEmails </label><input type="text" name="condition[monitorEmails|like]"/></li>
						<li><label> 是否是模板 </label><input type="text" name="condition[isTemplate|like]"/></li>
						<li><label> projectId </label><input type="text" name="condition[projectId|like]"/></li>
						<li><label> 接口返回contentType </label><input type="text" name="condition[contentType|like]"/></li>
						<li><label> contentType </label><input type="text" name="condition[contentType|like]"/></li>
						<li class="select-time">
							<label> createTime </label>
							<input type="text" class="time-input" placeholder="开始时间" name="condition[createTime|geTime]" lay-key="createTime-1">
							<span>-</span>
							<input type="text" class="time-input" placeholder="结束时间" name="condition[createTime|gtTime]" lay-key="createTime-2">
						</li>
						<li><label> errorList </label><input type="text" name="condition[errorList|like]"/></li>
						<li><label> falseExam </label><input type="text" name="condition[falseExam|like]"/></li>
						<li><label> fullUrl </label><input type="text" name="condition[fullUrl|like]"/></li>
						<li><label> interfaceName </label><input type="text" name="condition[interfaceName|like]"/></li>
						<li><label> isTemplate </label><input type="text" name="condition[isTemplate|like]"/></li>
						<li><label> moduleId </label><input type="text" name="condition[moduleId|like]"/></li>
						<li><label> monitorEmails </label><input type="text" name="condition[monitorEmails|like]"/></li>
						<li><label> monitorText </label><input type="text" name="condition[monitorText|like]"/></li>
						<li><label> monitorType </label><input type="text" name="condition[monitorType|like]"/></li>
						<li><label> paramRemark </label><input type="text" name="condition[paramRemark|like]"/></li>
						<li><label> projectId </label><input type="text" name="condition[projectId|like]"/></li>
						<li><label> requestExam </label><input type="text" name="condition[requestExam|like]"/></li>
						<li><label> responseParam </label><input type="text" name="condition[responseParam|like]"/></li>
						<li><label> trueExam </label><input type="text" name="condition[trueExam|like]"/></li>
						<li><label> updateBy </label><input type="text" name="condition[updateBy|like]"/></li>
						<li>
							<a class="btn btn-success btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
							<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
						</li>
						</ul>
					</div>
				</form>
			</div>

			<div class="btn-group-sm" id="toolbar" role="group">
				<a class="btn btn-success" onclick="$.operate.add()">
	                <i class="fa fa-plus"></i> 新增
	            </a>
	            <a class="btn btn-primary btn-edit disabled" onclick="$.operate.edit()">
		            <i class="fa fa-edit"></i> 修改
		        </a>
				<a class="btn btn-danger btn-del disabled" onclick="$.operate.removeAll()">
		            <i class="far fa-trash-alt"></i> 删除
		        </a>
		        <!--
		        <a class="btn btn-danger" onclick="$.operate.clean()">
	                <i class="fa fa-trash"></i> 清空
	            </a>
	            -->
	            <a class="btn btn-warning" onclick="$.table.exportExcel()">
		            <i class="fa fa-download"></i> 导出
		        </a>
	        </div>

			<div class="col-sm-12 select-table table-striped">
				<table id="bootstrap-table" data-mobile-responsive="true"></table>
			</div>
		</div>
	</div>

	<footer th:replace="dashboard/footer :: footer"></footer>

	<script>
		var prefix = ctx + "gateway/admin/gateLogger/" ;

		$(function() {
		    var options = {
		        url: prefix +"datatables" ,
		        createUrl: prefix + 'add' ,
		        updateUrl: prefix +"modify?id={id}" ,
		        statusUrl: prefix +"changeStatus?id={id}" ,
		        cleanUrl: prefix + "clean",
		        detailUrl: prefix +"detail?id={id}",
		        removeUrl: prefix + "delete" ,
		        exportUrl: prefix + "exportExcel",
		        sortName: "operTime",
		        uniqueId:"id" ,
		        sortOrder: "desc",
                modalName: "",
		        escape: true,
		        showPageGo: true,
		        rememberSelected: true,
		        columns: [{field: 'state',checkbox: true },

		{field: 'url', title: 'api链接'},
					{field: 'method', title: ' 请求方式'},
					{field: 'param', title: '参数列表'},
					{field: 'paramRemark', title: '请求参数备注'},
					{field: 'requestExam', title: '请求示例'},
					{field: 'responseParam', title: '返回参数说明'},
					{field: 'errorList', title: '接口错误码列表'},
					{field: 'trueExam', title: '正确返回示例'},
					{field: 'falseExam', title: '错误返回示例'},
					{field: 'status', title: '是否可用;0不可用；1可用;-1 删除'},
					{field: 'moduleId', title: '所属模块ID'},
					{field: 'interfaceName', title: '接口名'},
						{field: 'remark', title: 'remark'},
				{field: 'errors', title: '错误码、错误码信息'},
						{field: 'updateBy', title: 'updateBy'},
					{field: 'createTime', title: 'createTime'},
				{field: 'version', title: '版本号'},
					{field: 'sequence', title: '排序，越大越靠前'},
						{field: 'header', title: 'header'},
					{field: 'fullUrl', title: 'fullUrl'},
				{field: 'monitorType', title: '监控类型，多选：
Network("网络异常",1),Include("包含指定字符串",2),NotInclude("不包含指定字符串",3),NotEqual("不等于指定字符串",4);	
'},
					{field: 'monitorText', title: '监控比较内容'},
						{field: 'monitorEmails', title: 'monitorEmails'},
				{field: 'isTemplate', title: '是否是模板'},
						{field: 'projectId', title: 'projectId'},
				{field: 'contentType', title: '接口返回contentType'},
						{field: 'contentType', title: 'contentType'},
					{field: 'createTime', title: 'createTime'},
					{field: 'errorList', title: 'errorList'},
					{field: 'falseExam', title: 'falseExam'},
					{field: 'fullUrl', title: 'fullUrl'},
					{field: 'interfaceName', title: 'interfaceName'},
					{field: 'isTemplate', title: 'isTemplate'},
					{field: 'moduleId', title: 'moduleId'},
					{field: 'monitorEmails', title: 'monitorEmails'},
					{field: 'monitorText', title: 'monitorText'},
					{field: 'monitorType', title: 'monitorType'},
					{field: 'paramRemark', title: 'paramRemark'},
					{field: 'projectId', title: 'projectId'},
					{field: 'requestExam', title: 'requestExam'},
					{field: 'responseParam', title: 'responseParam'},
					{field: 'trueExam', title: 'trueExam'},
					{field: 'updateBy', title: 'updateBy'},
				    {field: 'hasStatusLabel', title: '状态', align: 'center',  formatter:function(value,row,index){ return $.table.status(value , row);}},
			        {field: 'addTime', title: '添加时间', align:'center' , width:'150px', sortable: true},
			        {field: 'id' , title: '操作', align: 'center', width:'200px', formatter: function(value, row, index) {
			                var actions = [];

			                actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.id + '\')"><i class="fa fa-edit"></i>详情</a> ');
			                actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
			                actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="far fa-trash-alt"></i>删除</a> ');

			                return actions.join('');
			          }
			     }]
		    };
		    $.table.init(options);
		});

	</script>
</body>
</html>

